Merged
Conversation
- not entirely sure why this works but replacing the replace with separate delete + insert commands allows the previous query to be fully removed
…id always replacing the last occurrence
bmarty
approved these changes
Nov 26, 2021
Member
bmarty
left a comment
There was a problem hiding this comment.
Thanks for those 2 fixes. Just a small comment about a comment :)
| override fun onPopupItemClicked(editable: Editable, item: String): Boolean { | ||
| // Detect last ":" and remove it | ||
| var startIndex = editable.lastIndexOf(":") | ||
| var startIndex = editable.subSequence(0, editText.selectionStart).lastIndexOf(":") |
Contributor
|
Thank you so much for fixing this ❤️! This has been driving me nuts for such a long time (and I never really could find reliable reproduction steps)... 😅 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3449 Leftover characters when inserting emojis by text.
This was a really strange issue, it seemed to only affect single character look ups eg
:abut didn't affect all emojis equally,:zworked without issue. There's no obvious place where we're incorrectly manipulating the message text content and replacing thereplacewith adelete + insertalso fixed the issue... perhaps some lingering spans in some cases?:by taking into account the current cursor position